import { Mesh, PlaneGeometry } from "three";
import { App, createTextFlowMaterial } from "vjmap3d";

export const createNotice = (app: App) => {
    let geoW = 8, geoH =2;
    let geom = new PlaneGeometry(geoW, geoH);
    let mat = createTextFlowMaterial(app, {
            geometryWidth: geoW,
            geometryHeight: geoH,
            flowDirection: "horizon",
            flowSpeed: 0.03,
            text: `通知: 免费通行的时间范围为春节、清明节、劳动节、国庆节等四个国家法定节假日,以及当年国务院办公厅文件确定的上述法定节假日连休日。免费时段从节假日第一天00:00开始,节假日最后一天24:00结束(普通公路以车辆通过收费站收费车道的时间为准,高速公路以车辆驶离出口收费车道的时间为准)。`,
            fill: "#16417C",
            font: "30px sans-serif",
            padding: [5, 5, 5, 5],
            backgroundColor: "#A1FB8E",
            lineHeight: 50
    });
    let gdMesh = new Mesh(geom, mat);
    gdMesh.position.set(0, 7.5, 0);
    app.scene.add(gdMesh);
}